Let's add 5 points if the sprite picks up a piece of litter from the recycle list.

  • Delete the .say() command inside the if statement. Use Remove Sprite to remove the hit_sprite.
  • Use Add Value to add 5 to recycle_xp each time your sprite collides with a recyclable.
  • Use Update Display to display your recycle_xp in the collected_display.

To navigate the page using the TAB key, first press ESC to exit the code editor.

# THIS ACTIVITY IS IN PREVIEW ONLY MODE
  • Run Code
  • Submit Work
  • Next Activity
  • Show Console
  • Reset Code Editor
  • Codesters How To (opens in a new tab)